home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / interface / MainFrm.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  6KB  |  182 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // MainFrm.h : Schnittstelle der Klasse CMainFrame
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22.  
  23. #if !defined(AFX_MAINFRM_H__741499DF_FFBB_481F_B214_8C14C31217BB__INCLUDED_)
  24. #define AFX_MAINFRM_H__741499DF_FFBB_481F_B214_8C14C31217BB__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. #include "misc\systemtray.h"
  31. #include "misc\led.h"
  32. #include "Options.h"    // Hinzugefⁿgt von der Klassenansicht
  33. #include "splitex.h"
  34.  
  35. class CStatusView;
  36. class CUsersView;
  37. class CAdminSocket;
  38.  
  39. class CUsersDlg;
  40. class CGroupsDlg;
  41. class CMainFrame : public CFrameWnd
  42. {
  43.     
  44. public:
  45.     CMainFrame(COptions *pOptions);
  46. protected: 
  47.     DECLARE_DYNAMIC(CMainFrame)
  48.  
  49. // Attribute
  50. public:
  51.  
  52. // Operationen
  53. public:
  54.     void ParseReply(int nReplyID, unsigned char *pData, int nDataLength);
  55.     void ParseStatus(int nStatusID, unsigned char *pData, int nDataLength);
  56.  
  57.     CStatusView* GetStatusPane();
  58.     CUsersView* GetUsersPane();
  59.  
  60.  
  61. // ▄berladungen
  62.     // Vom Klassenassistenten generierte ▄berladungen virtueller Funktionen
  63.     //{{AFX_VIRTUAL(CMainFrame)
  64.     public:
  65.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  66.     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  67.     protected:
  68.     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  69.     //}}AFX_VIRTUAL
  70.  
  71. // Implementierung
  72. public:
  73.     void CloseAdminSocket(bool shouldReconnect = true);
  74.     void ShowStatusRaw(const char *status, int nType);
  75.     void ShowStatus(const CString& status, int nType);
  76.     BOOL m_bQuit;
  77.     void SetIcon();
  78.     BOOL SendCommand(int nType);
  79.     BOOL SendCommand(int nType, void *pData, int nDataLength);
  80.     void OnAdminInterfaceConnected();
  81.     void OnAdminInterfaceClosed();
  82.  
  83.     virtual ~CMainFrame();
  84.  
  85. protected:
  86.     void DoConnect();
  87.  
  88.     CAdminSocket *m_pAdminSocket;
  89.     int m_nServerState;
  90.     CStatusView* m_pStatusPane;
  91.     CUsersView* m_pUsersPane;
  92.  
  93.     void CMainFrame::SetStatusbarText(int nIndex,CString str);
  94.     CLed m_SendLed;
  95.     CLed m_RecvLed;
  96.     CStatusBar  m_wndStatusBar;
  97.     CToolBar    m_wndToolBar;
  98.     CToolBar    m_wndUserListToolBar;
  99.     CSplitterWndEx m_wndSplitter;
  100.  
  101.     //// Internal support functions
  102.     void SetupTrayIcon();
  103.     
  104.     //// Internal data
  105.     CSystemTray m_TrayIcon;
  106.     int nTrayNotificationMsg_;
  107.  
  108.     // static data member to hold window class name
  109.     LPTSTR s_winClassName;
  110.  
  111.     CUsersDlg *m_pUsersDlg;
  112.     CGroupsDlg *m_pGroupsDlg;
  113.     COptionsDlg *m_pOptionsDlg;
  114.  
  115. // Generierte Message-Map-Funktionen
  116. protected:
  117.     int m_nEdit;
  118.     COptions *m_pOptions;
  119.     UINT_PTR m_nRateTimerID;
  120.     unsigned __int64 m_nSendCount;
  121.     unsigned __int64 m_nRecvCount;
  122.     __int64 m_nOldSendCount;
  123.     __int64 m_nOldRecvCount;
  124.     DWORD m_lastchecktime;
  125.     __int64 m_lastreaddiff;
  126.     __int64 m_lastwritediff;
  127.     UINT_PTR m_nTimerID;
  128.     UINT_PTR m_nReconnectTimerID;
  129.     int m_nReconnectCount;
  130.     CReBar m_wndReBar;
  131.     //{{AFX_MSG(CMainFrame)
  132.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  133.     afx_msg void OnSetFocus(CWnd *pOldWnd);
  134.     afx_msg void OnSize(UINT nType, int cx, int cy);
  135.     afx_msg void OnClose();
  136.     afx_msg void OnEditSettings();
  137.     afx_msg void OnActive();
  138.     afx_msg void OnUpdateActive(CCmdUI* pCmdUI);
  139.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);    
  140.     afx_msg void OnTrayExit();
  141.     afx_msg void OnTrayRestore();
  142.     afx_msg void OnLock();
  143.     afx_msg void OnUpdateLock(CCmdUI* pCmdUI);
  144.     afx_msg void OnTimer(UINT_PTR nIDEvent);
  145.     afx_msg void OnMenuEditUsers();
  146.     afx_msg void OnMenuEditGroups();
  147.     afx_msg void OnFileConnect();
  148.     afx_msg void OnFileDisconnect();
  149.     afx_msg void OnUpdateFileDisconnect(CCmdUI* pCmdUI);
  150.     afx_msg void OnUpdateEditSettings(CCmdUI* pCmdUI);
  151.     afx_msg void OnUpdateMenuEditUsers(CCmdUI* pCmdUI);
  152.     afx_msg void OnUpdateMenuEditGroups(CCmdUI* pCmdUI);
  153.     afx_msg void OnUpdateUsers(CCmdUI* pCmdUI);
  154.     afx_msg void OnUpdateGroups(CCmdUI* pCmdUI);
  155.     afx_msg void OnDestroy();
  156.     afx_msg void OnDisplayLogicalNames();
  157.     afx_msg void OnDisplayPhysicalNames();
  158.     afx_msg void OnUpdateDisplayLogicalNames(CCmdUI* pCmdUI);
  159.     afx_msg void OnUpdateDisplayPhysicalNames(CCmdUI* pCmdUI);
  160.     afx_msg void OnDisplaySortMenu();
  161.     afx_msg void OnToolbarDropDown(NMHDR* pnmh, LRESULT* plRes);
  162.     afx_msg void OnDisplaySortByUserid();
  163.     afx_msg void OnDisplaySortByAccount();
  164.     afx_msg void OnDisplaySortByIP();
  165.     afx_msg void OnUpdateDisplaySortByUserid(CCmdUI* pCmdUI);
  166.     afx_msg void OnUpdateDisplaySortByAccount(CCmdUI* pCmdUI);
  167.     afx_msg void OnUpdateDisplaySortByIP(CCmdUI* pCmdUI);
  168.     //}}AFX_MSG
  169.     DECLARE_MESSAGE_MAP()
  170. public:
  171.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  172. protected:
  173.     virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  174. };
  175.  
  176. /////////////////////////////////////////////////////////////////////////////
  177.  
  178. //{{AFX_INSERT_LOCATION}}
  179. // Microsoft Visual C++ fⁿgt unmittelbar vor der vorhergehenden Zeile zusΣtzliche Deklarationen ein.
  180.  
  181. #endif // !defined(AFX_MAINFRM_H__741499DF_FFBB_481F_B214_8C14C31217BB__INCLUDED_)
  182.